package com.it.zpj.javase.operator;

import java.util.Scanner;

public class ArithmeticOperator {
    public static void main(String[] args) {
        // 数值拆分
        // 需求：键盘录入一个三位数，将其拆分为个位、十位、百位后，打印在控制台
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个三位数：");
        int finali = sc.nextInt();
        int a = finali / 100;
        int b = finali / 10 % 10;
        int c = finali % 10;
        System.out.println("百位：" + a);
        System.out.println("十位：" + b);
        System.out.println("个位：" + c);
    }
}
